package com.codepilot.server.model.vo;

import com.codepilot.server.model.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("用户信息VO")
public class DisplayUserVO {

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("头像链接")
    private String avatar;

    @ApiModelProperty("生日")
    private String birthday;

    @ApiModelProperty("职业")
    private String job;

    @ApiModelProperty("电话")
    private String phone;

    @ApiModelProperty("邮箱")
    private String email;

    public DisplayUserVO(User user) {
        this.username = user.getUsername();
        this.avatar = user.getAvatar();
        this.birthday = user.getBirthday();
        this.job = user.getJob();
        this.phone = user.getPhone();
        this.email = user.getEmail();
    }

}
